package com.jamal2362.apktool.task;

import android.content.Context;
import brut.androlib.ApkOptions;
import brut.androlib.res.AndrolibResources;
import java.io.File;
import com.jamal2362.apktool.R;

public class ImportFrameworkTask extends AbstractTask
{
	public ImportFrameworkTask(Context ctx)
	{
		super(ctx, null);
	}

	@Override
	protected int getTitle()
	{
		return R.string.import_framework;
	}

	@Override
	protected boolean process(File f)
	{
		info(R.string.import_framework, (Object) null);
		try
		{
			AndrolibResources res = new AndrolibResources(this);
			res.apkOptions = ApkOptions.INSTANCE;
			res.installFramework(f);
			return true;
		}
		catch (Exception e)
		{
			publishProgress("E: " + e.getMessage());
		}
		return false;
	}



}
